import 'reflect-metadata';
import { DataSource } from 'typeorm';
import { User } from './entity/User';
import { UserDetail } from './entity/UserDetail';
import { Article } from './entity/Article';
import { ArticleCategory } from './entity/ArticleCategory';
import { Course } from './entity/Course';

export const AppDataSource = new DataSource({
  type: 'mysql',
  host: 'localhost',
  port: 3306,
  username: 'root',
  password: '123456',
  database: 'type-orm',
  synchronize: true,
  logging: false,
  entities: [User, UserDetail, Article, ArticleCategory, Course],
  migrations: [],
  subscribers: [],
});
